package com.wm.wmim.server.controller;



import com.wm.wmim.server.dto.bo.req.AddFriendReqBO;
import com.wm.wmim.server.dto.vo.req.CreateFriendReqVO;
import com.wm.wmim.server.mapstruct.FriendMapStruct;
import com.wm.wmim.server.service.FriendListService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 好友列表表(FriendList)表控制层
 *
 * @author weiming
 * @since 2025-02-20 23:25:50
 */
@RestController
@RequestMapping("/friend")
public class FriendListController {
    /**
     * 服务对象
     */
    @Resource
    private FriendListService friendListService;
    @Resource
    private FriendMapStruct friendMapStruct;

    @PostMapping("/add")
    public Boolean addFriend(@RequestBody CreateFriendReqVO reqVO) {
        AddFriendReqBO addFriendReqBO = friendMapStruct.fromVOToBO(reqVO);
        return friendListService.addFriend(addFriendReqBO);
    }

}

